﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
namespace GPMS.Model
{
    [MetadataType(typeof(RoleMetadata))]
    public partial class Role
    {
        public Role()
        {
            this.IsDeleted = false;
            this.IsMain = false;
            this.IsDefault = false;
        }
        public class RoleMetadata
        { 
            [DisplayName("角色名")]
            [Display(Order = 1)]
            [Required(ErrorMessage="必须输入一个角色名")]
            [RemoteCustom("Role","Verify",ErrorMessage="已存在同名角色")]
            public object RoleName { get; set; }

            [DisplayName("创建时间")]
            [ScaffoldColumn(false)]
            public object CreateDate{ get; set; }

            [DisplayName("描述")]
            [Display(Order=2)]
            public object Description { get; set; }

            [ScaffoldColumn(false)]
            public object IsDeleted { get; set; }

            [ScaffoldColumn(false)]            
            public object RoleID { get; set; }
            [Display(Name="是否显示",Order=3)]
            public object Display { get; set; }
            [Display(Name = "是否主要角色", Order = 4)]
            public object IsMain { get; set; }
            [Display(Name="是否默认角色 ")]
            public object IsDefault { get; set; }
        }
    }
}
